<%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/5/5
  Time: 16:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Login</title>
    <style>
        .code_a {
            color: #0000ff;
            font-size: 12px;
            text-decoration: none;
            cursor: pointer;
        }
        #imgCode{
            cursor: pointer;
        }
        .err{
            color: red;
        }
    </style>
    <script type="text/javascript">
        function changeCode(){
            var imgCode = document.getElementById("imgCode");
            imgCode.src = "checkCode?" + Math.random();
        }
    </script>
</head>
<body>
    <form action="login" method="post">
        <table>
            <tr>
                <td>用户名:</td>
                <td><input type="text" name="username" required="required"></td>
            </tr>
            <tr>
                <td>密&nbsp;&nbsp;码:</td>
                <td><input type="password" name="password" required="required"></td>
            </tr>
            <tr>
                <td>验证码:</td>
                <td>
                    <input type="text" name="inCode" id="inCode" required="required">
                    <img src="checkCode" align="center" id="imgCode" onclick="changeCode()">
                    <a class="code_a" onclick="changeCode()">换一张</a>
                </td>
            </tr>
            <tr>
                <td><input type="submit" value="登录"></td>
                <td><a style="text-decoration: none" href="register.jsp">注册</a></td>
            </tr>
        </table>

    </form>
    <div class="err">${err}</div>
</body>
</html>
